/*
 * @Author: DUST
 * @Date: 2023-05-29 16:54:04
 * @LastEditors: DUST
 * @LastEditTime: 2023-06-06 16:18:14
 * @FilePath: \koa-node-ts\app\router\notes.ts
 * @Description: 
 * undefined
 */

import koaRouter from "koa-router";
import NoteController from "../controller/NoteController";

const noteRouter = new koaRouter();

noteRouter.prefix("/note");

// 获取笔记列表
noteRouter.get("/page", NoteController.getNoteList);
// 新增笔记
noteRouter.post("/add", NoteController.addNote);
// 编辑笔记
noteRouter.put("/edit", NoteController.editNote);
// 删除笔记
noteRouter.delete("/delete/:id", NoteController.deleteNote);

export default noteRouter;